<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="format-detection" content="telephone=no">
		<script type="text/javascript" src="layui/layui.js"></script>
		<script type="text/javascript" src="layui/css/layui.css"></script>
		<script type="text/javascript" src="js/jquery.js"></script>
		<script type="text/javascript" src="js/public.js"></script>
		<script type="text/javascript" src="js/paging.js"></script>
	    <link rel="stylesheet" href="kindeditor-4.0.4/themes/default/default.css" />
		<link rel="stylesheet" href="kindeditor-4.0.4/plugins/code/prettify.css" />
		<script charset="utf-8" src="kindeditor-4.0.4/kindeditor.js"></script>
		<script charset="utf-8" src="kindeditor-4.0.4/lang/zh_CN.js"></script>
		<script charset="utf-8" src="kindeditor-4.0.4/plugins/code/prettify.js"></script>
		<link rel="stylesheet" href="css/public.css" media="all">
		<title>重要通知</title>
    <script>
        KindEditor.ready(function(K) {
            var editor = K.create('textarea[name="content"]', {
                uploadJson : 'kindeditor-4.0.4/php/upload_json.php',
                fileManagerJson : 'kindeditor-4.0.4/php/file_manager_json.php',
                allowFileManager : true,
                afterCreate : function() {
                    var self = this;
                    K.ctrl(document, 13, function() {
                        self.sync();
                        K('form[name=example]')[0].submit();
                    });
                    K.ctrl(self.edit.doc, 13, function() {
                        self.sync();
                        K('form[name=example]')[0].submit();
                    });
                },
                afterFocus : function(){//获得焦点 删除默认文字信息
                    editor.sync('#content');
                },
                afterBlur : function(){
                    this.sync();
                }
            });
            prettyPrint();
			
        });
		var editorEdit;
		KindEditor.ready(function(K) {
			editorEdit = K.create('textarea[name="content_edit"]', {
			    uploadJson : 'kindeditor-4.0.4/php/upload_json.php',
			    fileManagerJson : 'kindeditor-4.0.4/php/file_manager_json.php',
			    allowFileManager : true,
			    afterCreate : function() {
			        var self = this;
			        K.ctrl(document, 13, function() {
			            self.sync();
			            K('form[name=example]')[0].submit();
			        });
			        K.ctrl(self.edit.doc, 13, function() {
			            self.sync();
			            K('form[name=example]')[0].submit();
			        });
			    },
			    afterFocus : function(){//获得焦点 删除默认文字信息
			        editor.sync('#content_edit');
			    },
			    afterBlur : function(){
			        this.sync();
			    }
			});
            prettyPrint();
			
        });
		var editorInfo;
		KindEditor.ready(function(K) {
			editorInfo = K.create('textarea[name="content_info"]', {
			    uploadJson : 'kindeditor-4.0.4/php/upload_json.php',
			    fileManagerJson : 'kindeditor-4.0.4/php/file_manager_json.php',
			    allowFileManager : true,
			    afterCreate : function() {
			        var self = this;
			        K.ctrl(document, 13, function() {
			            self.sync();
			            K('form[name=example]')[0].submit();
			        });
			        K.ctrl(self.edit.doc, 13, function() {
			            self.sync();
			            K('form[name=example]')[0].submit();
			        });
			    },
			    afterFocus : function(){//获得焦点 删除默认文字信息
			        editor.sync('#content_info');
			    },
			    afterBlur : function(){
			        this.sync();
			    }
			});
		    prettyPrint();
			
		});
    </script>
	</head>
	<body onload="pageStart(2)">
		<!--查看start-->
		<div style="display: none;" id="infoDiv" class="add-container">
			<div class="black-cloth"></div>
			<div class="add-content">
				<div class="popup-top">
					<label class="popup-add-title">查看</label>
					<img onclick="closeInfoDiv();" src="img/close_icon.png"/>
				</div>
				<div class="popup-item">
					<label class="popup-txt">主题</label>
					<input id="theme_info" name="theme" type="text" class="popup-input" placeholder="请输入主题" disabled="disabled"/>
				</div>
				<div class="popup-item">
					<label class="popup-txt">权重</label>
					<input id="weight_info" name="weight" type="number" class="popup-input" placeholder="请输入权重"  disabled="disabled"/>
				</div>
				<div class="popup-item">
					<label class="popup-txt">内容</label>
					<textarea class="popup-textarea" style="width: 510px;height: 260px;margin-left: 10px;" id="content_info" name="content_info"  disabled="disabled"></textarea>
				</div>
			</div>
		</div>
		<!--查看end-->
		<!--添加start-->
		<div style="display: none;" id="addDiv" class="add-container">
			<div class="black-cloth"></div>
			<div class="add-content">
				<div class="popup-top">
					<label class="popup-add-title">添加</label>
					<img onclick="addClose();" src="img/close_icon.png"/>
				</div>
				<div class="popup-item">
					<label class="popup-txt">主题</label>
					<input id="theme" name="theme" type="text" class="popup-input" placeholder="请输入主题"/>
				</div>
				<div class="popup-item">
					<label class="popup-txt">权重</label>
					<input id="weight" name="weight" type="number" class="popup-input" placeholder="请输入权重"/>
				</div>
				<div class="popup-item">
					<label class="popup-txt">内容</label>
					<textarea class="popup-textarea" style="width: 510px;height: 260px;margin-left: 10px;" id="content" name="content"></textarea>
				</div>
				<div class="popup-item" style="text-align: center;">
					<center>
					<button type="button" class="saveBtn" onclick="noticeAddSave();">保存</button>
					<button class="cancelBtn" onclick="addClose();" >取消</button>
					</center>
				</div>
			</div>
		</div>
		<!--添加end-->
		<!--编辑start-->
		<div style="display: none;" id="editDiv" class="add-container">
			<div class="black-cloth"></div>
			<div class="add-content">
				<div class="popup-top">
					<label class="popup-add-title">编辑</label>
					<img onclick="editClose();" src="img/close_icon.png"/>
				</div>
				<div class="popup-item">
					<label class="popup-txt">主题</label>
					<input id="title_edit" type="text" class="popup-input" value="每月一号缴纳物业费"/>
				</div>
				<div class="popup-item">
					<label class="popup-txt">权重</label>
					<input id="weight_edit" type="number" class="popup-input" value="1"/>
				</div>
				<div class="popup-item">
					<label class="popup-txt">内容</label>
					<textarea class="popup-textarea" id="content_edit" style="width: 510px;height: 260px;margin-left: 10px;" name="content_edit"></textarea>
				</div>
				<div class="popup-item" style="text-align: center;">
					<center>
					<button class="saveBtn" onclick="noticeEditSave();">保存</button>
					<button class="cancelBtn" onclick="editClose();" >取消</button>
					</center>
				</div>
				<input id="noticeId" value="1"  style="display: none;"/>
			</div>
		</div>
		<!--编辑end-->
		<div class="page-div">
			<label class="my-txt">项目部</label>
			<select id="search_project" class="my-select">
				<option value="-1">全部</option>
			</select>
			<label class="my-txt">部门</label>
			<select id="search_department" class="my-select">
				<option value="-1">全部</option>
			</select>
			<label class="my-txt">起</label>
			<input id="search_date_start" type="date" class="my-date"/>
			<label class="my-txt">止 
			</label>
			<input id="search_date_end" type="date" class="my-date"/>
			<input id="search_keyword" type="text" class="my-input" placeholder="搜索关键字"/>
			<button id="searchBtn" class="my-search-btn" onclick="search(2);">搜索</button>
			<button id="addBtn" class="my-import-btn" onclick="add();">添加</button>
		</div>
		<div class="data-div">
			<div id="data" class="data-div-table">
			<table>
				<tr class="table-top">
					<td width="30%">标题</td>
					<td width="30%">时间</td>
					<td width="15%">权重</td>
					<td width="25%">操作</td>
				</tr>
				<tr class="item-white">
					<td colspan="4"><div>暂无数据</div></td>
				</tr>
			</table>
			</div>
			<center><div id="page" class="page_div"></div></center>
		</div>
		<input id="pageNo" value="1" style="display: none;"/>
		<input id="total_page" value="1"  style="display: none;"/>
		<input id="total_rows" value="1"  style="display: none;"/>
		<input id="keyword" value="查询"  style="display: none;"/>
	</body>
</html>
